/*
 * @author ${user}
 * @date ${year}-${month}-${day}
 */

package net.xdclass.component;

import net.xdclass.enums.ProductOrderPayTypeEnum;
import net.xdclass.vo.PayInfoVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class PayStrategyContext {
    private PayStrategy payStrategy;

    public PayStrategyContext(PayStrategy payStrategy){
    	this.payStrategy = payStrategy;
	}
	/**
	 * 退款接口
	 * @param payInfoVO
	 * @return
	 */
	public String refund(PayInfoVO payInfoVO){
		return payStrategy.refund(payInfoVO); }


	public String unifiedOrder(PayInfoVO payInfoVO){
		return payStrategy.unifiedOrder(payInfoVO); }

	/**
	 * 查询支付状态
	 * @param payInfoVO
	 * @return
	 */
	public String queryPayStatus(PayInfoVO payInfoVO){
		return payStrategy.queryPayStatus(payInfoVO); }


	/**
	 * 关闭订单
	 * @param payInfoVO
	 * @return
	 */
	public String closeOrder(PayInfoVO payInfoVO){
		return payStrategy.closeOrder(payInfoVO); }


}
